package com.abc.db;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;

public class ConfigData {
	private Context context;
	private SharedPreferences sp;
	private Boolean isFirstStart; //是否第一次启动
	
	/**
	 * 初始化参数
	 * @param context
	 */
	public ConfigData(Context context){
		this.context =context;
		sp = context.getSharedPreferences("SP", Context.MODE_PRIVATE);
		//load data
		isFirstStart = sp.getBoolean("isFirstStart", true);
		
	}
	
	public void saveData(){
		Editor editor = sp.edit();
		editor.putBoolean("isFirstStart", isFirstStart);
		editor.commit();
	}

	public Boolean getIsFirstStart() {
		return isFirstStart;
	}

	public void setIsFirstStart(Boolean isFirstStart) {
		this.isFirstStart = isFirstStart;
	}
	
}
